Example #1
0
 public function test__construct()
 {
     $this->if($runner = new testedClass($name = uniqid()))->then->boolean($runner->hasDefaultArguments())->isFalse()->array($runner->getDefaultArguments())->isEmpty()->string($runner->getName())->isEqualTo($name)->object($runner->getAdapter())->isInstanceOf('mageekguy\\atoum\\adapter')->object($runner->getLocale())->isInstanceOf('mageekguy\\atoum\\locale')->object($runner->getIncluder())->isInstanceOf('mageekguy\\atoum\\includer')->object($runner->getRunner())->isInstanceOf('mageekguy\\atoum\\runner')->variable($runner->getScoreFile())->isNull()->array($runner->getReports())->isEmpty()->array($runner->getArguments())->isEmpty()->array($runner->getHelp())->isEqualTo(array(array(array('-h', '--help'), null, 'Display this help'), array(array('-c', '--configurations'), '<file>...', 'Use all configuration files <file>'), array(array('-v', '--version'), null, 'Display version'), array(array('+verbose', '++verbose'), null, 'Enable verbose mode'), array(array('--init'), '<path/to/directory>', sprintf($runner->getLocale()->_('Create configuration and bootstrap files in <path/to/directory> (Optional, default: %s)'), $runner->getDirectory())), array(array('-p', '--php'), '<path/to/php/binary>', 'Path to PHP binary which must be used to run tests'), array(array('-drt', '--default-report-title'), '<string>', 'Define default report title with <string>'), array(array('-sf', '--score-file'), '<file>', 'Save score in file <file>'), array(array('-mcn', '--max-children-number'), '<integer>', 'Maximum number of sub-processus which will be run simultaneously'), array(array('-ncc', '--no-code-coverage'), null, 'Disable code coverage'), array(array('-nccid', '--no-code-coverage-in-directories'), '<directory>...', 'Disable code coverage in directories <directory>'), array(array('-nccfns', '--no-code-coverage-for-namespaces'), '<namespace>...', 'Disable code coverage for namespaces <namespace>'), array(array('-nccfc', '--no-code-coverage-for-classes'), '<class>...', 'Disable code coverage for classes <class>'), array(array('-nccfm', '--no-code-coverage-for-methods'), '<method>...', 'Disable code coverage for methods <method>'), array(array('-ebpc', '--enable-branch-and-path-coverage'), null, 'Enable branch and path coverage'), array(array('-f', '--files'), '<file>...', 'Execute all unit test files <file>'), array(array('-d', '--directories'), '<directory>...', 'Execute unit test files in all <directory>'), array(array('-tfe', '--test-file-extensions'), '<extension>...', 'Execute unit test files with one of extensions <extension>'), array(array('-g', '--glob'), '<pattern>...', 'Execute unit test files which match <pattern>'), array(array('-t', '--tags'), '<tag>...', 'Execute only unit test with tags <tag>'), array(array('-m', '--methods'), '<class::method>...', 'Execute all <class::method>, * may be used as wildcard for class name or method name'), array(array('-ns', '--namespaces'), '<namespace>...', 'Execute all classes in all namespaces <namespace>'), array(array('-l', '--loop'), null, 'Execute tests in an infinite loop'), array(array('--test-it'), null, 'Execute atoum unit tests'), array(array('--test-all'), null, 'DEPRECATED, please do $runner->addTestsFromDirectory(\'path/to/default/tests/directory\') in a configuration file and use atoum without any argument instead'), array(array('-ft', '--force-terminal'), null, 'Force output as in terminal'), array(array('-bf', '--bootstrap-file'), '<file>', 'Include <file> before executing each test method'), array(array('-ulr', '--use-light-report'), null, 'Use "light" CLI report'), array(array('-utr', '--use-tap-report'), null, 'Use TAP report'), array(array('--debug'), null, 'Enable debug mode'), array(array('-xc', '--xdebug-config'), null, 'Set XDEBUG_CONFIG variable'), array(array('-fivm', '--fail-if-void-methods'), null, 'Make the test suite fail if there is at least one void test method'), array(array('-fism', '--fail-if-skipped-methods'), null, 'Make the test suite fail if there is at least one skipped test method')))->if($runner = new testedClass($name = uniqid(), $adapter = new atoum\adapter()))->then->string($runner->getName())->isEqualTo($name)->object($runner->getAdapter())->isIdenticalTo($adapter)->object($runner->getLocale())->isInstanceOf('mageekguy\\atoum\\locale')->object($runner->getIncluder())->isInstanceOf('mageekguy\\atoum\\includer')->object($runner->getRunner())->isInstanceOf('mageekguy\\atoum\\runner')->variable($runner->getScoreFile())->isNull()->array($runner->getArguments())->isEmpty()->array($runner->getHelp())->isEqualTo(array(array(array('-h', '--help'), null, 'Display this help'), array(array('-c', '--configurations'), '<file>...', 'Use all configuration files <file>'), array(array('-v', '--version'), null, 'Display version'), array(array('+verbose', '++verbose'), null, 'Enable verbose mode'), array(array('--init'), '<path/to/directory>', sprintf($runner->getLocale()->_('Create configuration and bootstrap files in <path/to/directory> (Optional, default: %s)'), $runner->getDirectory())), array(array('-p', '--php'), '<path/to/php/binary>', 'Path to PHP binary which must be used to run tests'), array(array('-drt', '--default-report-title'), '<string>', 'Define default report title with <string>'), array(array('-sf', '--score-file'), '<file>', 'Save score in file <file>'), array(array('-mcn', '--max-children-number'), '<integer>', 'Maximum number of sub-processus which will be run simultaneously'), array(array('-ncc', '--no-code-coverage'), null, 'Disable code coverage'), array(array('-nccid', '--no-code-coverage-in-directories'), '<directory>...', 'Disable code coverage in directories <directory>'), array(array('-nccfns', '--no-code-coverage-for-namespaces'), '<namespace>...', 'Disable code coverage for namespaces <namespace>'), array(array('-nccfc', '--no-code-coverage-for-classes'), '<class>...', 'Disable code coverage for classes <class>'), array(array('-nccfm', '--no-code-coverage-for-methods'), '<method>...', 'Disable code coverage for methods <method>'), array(array('-ebpc', '--enable-branch-and-path-coverage'), null, 'Enable branch and path coverage'), array(array('-f', '--files'), '<file>...', 'Execute all unit test files <file>'), array(array('-d', '--directories'), '<directory>...', 'Execute unit test files in all <directory>'), array(array('-tfe', '--test-file-extensions'), '<extension>...', 'Execute unit test files with one of extensions <extension>'), array(array('-g', '--glob'), '<pattern>...', 'Execute unit test files which match <pattern>'), array(array('-t', '--tags'), '<tag>...', 'Execute only unit test with tags <tag>'), array(array('-m', '--methods'), '<class::method>...', 'Execute all <class::method>, * may be used as wildcard for class name or method name'), array(array('-ns', '--namespaces'), '<namespace>...', 'Execute all classes in all namespaces <namespace>'), array(array('-l', '--loop'), null, 'Execute tests in an infinite loop'), array(array('--test-it'), null, 'Execute atoum unit tests'), array(array('--test-all'), null, 'DEPRECATED, please do $runner->addTestsFromDirectory(\'path/to/default/tests/directory\') in a configuration file and use atoum without any argument instead'), array(array('-ft', '--force-terminal'), null, 'Force output as in terminal'), array(array('-bf', '--bootstrap-file'), '<file>', 'Include <file> before executing each test method'), array(array('-ulr', '--use-light-report'), null, 'Use "light" CLI report'), array(array('-utr', '--use-tap-report'), null, 'Use TAP report'), array(array('--debug'), null, 'Enable debug mode'), array(array('-xc', '--xdebug-config'), null, 'Set XDEBUG_CONFIG variable'), array(array('-fivm', '--fail-if-void-methods'), null, 'Make the test suite fail if there is at least one void test method'), array(array('-fism', '--fail-if-skipped-methods'), null, 'Make the test suite fail if there is at least one skipped test method')));
 }
Example #2
0
 public function test__construct()
 {
     $this->if($runner = new scripts\runner($name = uniqid()))->then->string($runner->getName())->isEqualTo($name)->object($runner->getAdapter())->isInstanceOf('mageekguy\\atoum\\adapter')->object($runner->getLocale())->isInstanceOf('mageekguy\\atoum\\locale')->object($runner->getIncluder())->isInstanceOf('mageekguy\\atoum\\includer')->object($runner->getRunner())->isInstanceOf('mageekguy\\atoum\\runner')->variable($runner->getScoreFile())->isNull()->array($runner->getReports())->isEmpty()->array($runner->getArguments())->isEmpty()->array($runner->getHelp())->isEqualTo(array(array(array('-h', '--help'), null, 'Display this help'), array(array('-v', '--version'), null, 'Display version'), array(array('-p', '--php'), '<path/to/php/binary>', 'Path to PHP binary which must be used to run tests'), array(array('-drt', '--default-report-title'), '<string>', 'Define default report title with <string>'), array(array('-c', '--configurations'), '<file>...', 'Use all configuration files <file>'), array(array('-sf', '--score-file'), '<file>', 'Save score in file <file>'), array(array('-mcn', '--max-children-number'), '<integer>', 'Maximum number of sub-processus which will be run simultaneously'), array(array('-ncc', '--no-code-coverage'), null, 'Disable code coverage'), array(array('-nccid', '--no-code-coverage-in-directories'), '<directory>...', 'Disable code coverage in directories <directory>'), array(array('-nccfns', '--no-code-coverage-for-namespaces'), '<namespace>...', 'Disable code coverage for namespaces <namespace>'), array(array('-nccfc', '--no-code-coverage-for-classes'), '<class>...', 'Disable code coverage for classes <class>'), array(array('-f', '--files'), '<file>...', 'Execute all unit test files <file>'), array(array('-d', '--directories'), '<directory>...', 'Execute unit test files in all <directory>'), array(array('-tfe', '--test-file-extensions'), '<extension>...', 'Execute unit test files with one of extensions <extension>'), array(array('-g', '--glob'), '<pattern>...', 'Execute unit test files which match <pattern>'), array(array('-t', '--tags'), '<tag>...', 'Execute only unit test with tags <tag>'), array(array('-m', '--methods'), '<class::method>...', 'Execute all <class::method>, * may be used as wildcard for class name or method name'), array(array('-ns', '--namespaces'), '<namespace>...', 'Execute all classes in all namespaces <namespace>'), array(array('-l', '--loop'), null, 'Execute tests in an infinite loop'), array(array('--test-it'), null, 'Execute atoum unit tests'), array(array('--test-all'), null, 'Execute unit tests in directories defined via $script->addTestAllDirectory(\'path/to/directory\') in a configuration file'), array(array('-ft', '--force-terminal'), null, 'Force output as in terminal'), array(array('-bf', '--bootstrap-file'), '<file>', 'Include <file> before executing each test method'), array(array('-ulr', '--use-light-report'), null, 'Use "light" CLI report'), array(array('--debug'), null, 'Enable debug mode')))->if($runner = new scripts\runner($name = uniqid(), $adapter = new atoum\adapter()))->then->string($runner->getName())->isEqualTo($name)->object($runner->getAdapter())->isIdenticalTo($adapter)->object($runner->getLocale())->isInstanceOf('mageekguy\\atoum\\locale')->object($runner->getIncluder())->isInstanceOf('mageekguy\\atoum\\includer')->object($runner->getRunner())->isInstanceOf('mageekguy\\atoum\\runner')->variable($runner->getScoreFile())->isNull()->array($runner->getArguments())->isEmpty()->array($runner->getHelp())->isEqualTo(array(array(array('-h', '--help'), null, 'Display this help'), array(array('-v', '--version'), null, 'Display version'), array(array('-p', '--php'), '<path/to/php/binary>', 'Path to PHP binary which must be used to run tests'), array(array('-drt', '--default-report-title'), '<string>', 'Define default report title with <string>'), array(array('-c', '--configurations'), '<file>...', 'Use all configuration files <file>'), array(array('-sf', '--score-file'), '<file>', 'Save score in file <file>'), array(array('-mcn', '--max-children-number'), '<integer>', 'Maximum number of sub-processus which will be run simultaneously'), array(array('-ncc', '--no-code-coverage'), null, 'Disable code coverage'), array(array('-nccid', '--no-code-coverage-in-directories'), '<directory>...', 'Disable code coverage in directories <directory>'), array(array('-nccfns', '--no-code-coverage-for-namespaces'), '<namespace>...', 'Disable code coverage for namespaces <namespace>'), array(array('-nccfc', '--no-code-coverage-for-classes'), '<class>...', 'Disable code coverage for classes <class>'), array(array('-f', '--files'), '<file>...', 'Execute all unit test files <file>'), array(array('-d', '--directories'), '<directory>...', 'Execute unit test files in all <directory>'), array(array('-tfe', '--test-file-extensions'), '<extension>...', 'Execute unit test files with one of extensions <extension>'), array(array('-g', '--glob'), '<pattern>...', 'Execute unit test files which match <pattern>'), array(array('-t', '--tags'), '<tag>...', 'Execute only unit test with tags <tag>'), array(array('-m', '--methods'), '<class::method>...', 'Execute all <class::method>, * may be used as wildcard for class name or method name'), array(array('-ns', '--namespaces'), '<namespace>...', 'Execute all classes in all namespaces <namespace>'), array(array('-l', '--loop'), null, 'Execute tests in an infinite loop'), array(array('--test-it'), null, 'Execute atoum unit tests'), array(array('--test-all'), null, 'Execute unit tests in directories defined via $script->addTestAllDirectory(\'path/to/directory\') in a configuration file'), array(array('-ft', '--force-terminal'), null, 'Force output as in terminal'), array(array('-bf', '--bootstrap-file'), '<file>', 'Include <file> before executing each test method'), array(array('-ulr', '--use-light-report'), null, 'Use "light" CLI report'), array(array('--debug'), null, 'Enable debug mode')));
 }