Exemplo n.º 1
0
Arquivo: test.php Projeto: atoum/atoum
 public function testGetTestMethods()
 {
     $this->if($test = new emptyTest())->then->boolean($test->ignore(false)->isIgnored())->isTrue()->sizeOf($test)->isZero()->array($test->getTestMethods())->isEmpty()->if($test = new notEmptyTest())->then->boolean($test->isIgnored())->isTrue()->boolean($test->methodIsIgnored('testMethod1'))->isTrue()->boolean($test->methodIsIgnored('testMethod2'))->isTrue()->sizeOf($test)->isEqualTo(0)->array($test->getTestMethods())->isEmpty()->boolean($test->ignore(false)->isIgnored())->isFalse()->boolean($test->methodIsIgnored('testMethod1'))->isFalse()->boolean($test->methodIsIgnored('testMethod2'))->isFalse()->sizeOf($test)->isEqualTo(2)->array($test->getTestMethods())->isEqualTo(array('testMethod1', 'testMethod2'))->array($test->getTestMethods(array('method')))->isEqualTo(array('testMethod1', 'testMethod2'))->array($test->getTestMethods(array('test')))->isEqualTo(array('testMethod1', 'testMethod2'))->array($test->getTestMethods(array('two')))->isEqualTo(array('testMethod2'))->array($test->getTestMethods(array(uniqid())))->isEmpty()->array($test->getTestMethods(array('test', 'method')))->isEqualTo(array('testMethod1', 'testMethod2'))->array($test->getTestMethods(array('test', 'method', uniqid())))->isEqualTo(array('testMethod1', 'testMethod2'))->array($test->getTestMethods(array('test', 'method', 'two', uniqid())))->isEqualTo(array('testMethod1', 'testMethod2'));
 }