Skip to content

Commit

Permalink
added tests to check BC for ServiceManager v2
Browse files Browse the repository at this point in the history
  • Loading branch information
svycka committed Mar 23, 2016
1 parent 4f79ce5 commit 1176b18
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ZfrCorsTest/Factory/CorsOptionsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@ public function testCanCreateOptions()

$this->assertInstanceOf('ZfrCors\Options\CorsOptions', $options);
}

public function testCanCreateOptionsWithServiceManagerV2()
{
$serviceManager = ServiceManagerFactory::getServiceManager();
$factory = new \ZfrCors\Factory\CorsOptionsFactory();
$options = $factory->createService($serviceManager);

$this->assertInstanceOf('ZfrCors\Options\CorsOptions', $options);
}
}
9 changes: 9 additions & 0 deletions tests/ZfrCorsTest/Factory/CorsRequestListenerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@ public function testCanCreateCorsRequestListener()

$this->assertInstanceOf('ZfrCors\Mvc\CorsRequestListener', $listener);
}

public function testCanCreateCorsRequestListenerWithServiceManagerV2()
{
$serviceManager = ServiceManagerFactory::getServiceManager();
$factory = new \ZfrCors\Factory\CorsRequestListenerFactory();
$listener = $factory->createService($serviceManager);

$this->assertInstanceOf('ZfrCors\Mvc\CorsRequestListener', $listener);
}
}
9 changes: 9 additions & 0 deletions tests/ZfrCorsTest/Factory/CorsServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@ public function testCanCreateCorsService()

$this->assertInstanceOf('ZfrCors\Service\CorsService', $service);
}

public function testCanCreateCorsServiceWithServiceManagerV2()
{
$serviceManager = ServiceManagerFactory::getServiceManager();
$factory = new \ZfrCors\Factory\CorsServiceFactory();
$service = $factory->createService($serviceManager);

$this->assertInstanceOf('ZfrCors\Service\CorsService', $service);
}
}

0 comments on commit 1176b18

Please sign in to comment.