getAsserterGenerator() 공개 메소드

예제 #1
0
 public function setTest(test $test)
 {
     $asserter = null;
     $test->getAssertionManager()->setHandler('json', function ($json, $depth = null, $options = null) use($test, &$asserter) {
         if ($asserter === null) {
             $asserter = new atoum\jsonSchema\asserters\json($test->getAsserterGenerator());
         }
         return $asserter->setWith($json, $depth, $options);
     });
     return $this;
 }
예제 #2
0
 public function setTest(test $test)
 {
     $asserter = null;
     $test->getAssertionManager()->setHandler('blackfireProfile', function ($client, $callback, $configuration) use($test, &$asserter) {
         if ($asserter === null) {
             $asserter = new atoum\blackfire\asserters\blackfireProfile($test->getAsserterGenerator());
         }
         return $asserter->setWith($client, $callback, $configuration);
     });
     return $this;
 }
예제 #3
0
 public function setTest(atoum\test $test)
 {
     $this->test = $test;
     $asserter = null;
     $this->test->getAssertionManager()->setHandler('prophet', function ($classOrInterface = null) use($test, &$asserter) {
         if ($asserter === null) {
             $asserter = new asserters\prophet($test->getAsserterGenerator());
         }
         $asserter->setWithTest($test);
         if ($classOrInterface !== null) {
             return $asserter->prophesize($classOrInterface);
         }
         return $asserter;
     });
     return $this;
 }
예제 #4
0
 public function setTest(test $test)
 {
     $asserter = null;
     $test->getAssertionManager()->setHandler('containerBuilder', function ($object) use($test, &$asserter) {
         if ($asserter === null) {
             $asserter = new atoum\symfonyDependencyInjection\asserters\containerBuilder($test->getAsserterGenerator());
         }
         $asserter->setWithTest($test);
         return $asserter->setWith($object);
     })->setHandler('serviceDefinition', function ($object) use($test, &$asserter) {
         if ($asserter === null) {
             $asserter = new atoum\symfonyDependencyInjection\asserters\serviceDefinition($test->getAsserterGenerator());
         }
         $asserter->setWithTest($test);
         return $asserter->setWith($object);
     });
     return $this;
 }
예제 #5
0
 public function setTest(test $test)
 {
     $asserter = null;
     $configuration = $test->getExtensionConfiguration($this);
     if ($configuration !== null) {
         $this->configuration = $configuration;
     }
     $test->getAssertionManager()->setHandler('blackfire', function (Client $client = null) use($test, &$asserter) {
         if ($asserter === null) {
             $asserter = new atoum\blackfire\asserters\blackfire($test->getAsserterGenerator());
         }
         if (null === $client) {
             $client = new Client($this->configuration->getClientConfiguration());
         }
         $asserter->setClient($client);
         $asserter->setWithTest($test);
         return $asserter;
     });
     return $this;
 }