getTestedClassName() public method

public getTestedClassName ( )
示例#1
0
 public function setWithTest(atoum\test $test)
 {
     $this->reset();
     $this->test = $test;
     $this->testedClassName = $test->getTestedClassName();
     $this->phpClass->setWith($this->testedClassName);
     return parent::setWithTest($test);
 }
示例#2
0
 /**
  * @param test   $test
  * @param string $methodNameToCheck
  * @return bool
  * @throws \RuntimeException
  */
 public function isMethodIgnored(test $test, $methodNameToCheck)
 {
     $contexts = array();
     foreach ($test->getTestMethods() as $methodName) {
         $contexts[$methodName] = new HoaContext();
         $contexts[$methodName]['method'] = $methodName;
         $contexts[$methodName]['class'] = $test->getClass();
         $contexts[$methodName]['namespace'] = $test->getClassNamespace();
         $contexts[$methodName]['testedclass'] = $test->getTestedClassName();
         $contexts[$methodName]['testedclassnamespace'] = $test->getTestedClassNamespace();
     }
     foreach ($test->getMandatoryMethodExtensions() as $methodName => $extensions) {
         $contexts[$methodName]['extensions'] = $extensions;
     }
     foreach ($test->getMethodTags() as $methodName => $tags) {
         $contexts[$methodName]['tags'] = $tags;
     }
     if (!isset($contexts[$methodNameToCheck])) {
         throw new \RuntimeException(sprintf('Method not found : %s', $methodNameToCheck));
     }
     return false === $this->ruler->assert($this->rule, $contexts[$methodNameToCheck]);
 }
示例#3
0
 public function setWithTest(atoum\test $test)
 {
     parent::setWith($test->getTestedClassName());
     return parent::setWithTest($test);
 }
示例#4
0
 public function addXdebugDataForTest(atoum\test $test, array $data)
 {
     return $this->addXdebugDataForClass($test->getTestedClassName(), $data);
 }
示例#5
0
 public function getTestedClassName()
 {
     $testedClassName = parent::getTestedClassName();
     return preg_replace('/test$/i', '', $testedClassName);
 }