/**
  * Defines all tests for this suite.
  *
  * @return TestSuite
  */
 public static function suite()
 {
     $suite = new TestSuite('All Asset Tests');
     $path = dirname(__FILE__) . DS;
     $suite->addTestDirectoryRecursive($path);
     return $suite;
 }
Esempio n. 2
0
 public static function suite()
 {
     $suite = new TestSuite('All CRUD listener tests');
     $path = Plugin::path('Crud');
     $testPath = $path . DS . 'tests' . DS . 'TestCase';
     if (!is_dir($testPath)) {
         return $suite;
     }
     $suite->addTestDirectoryRecursive($testPath . DS . 'Listener');
     return $suite;
 }
Esempio n. 3
0
 public static function suite()
 {
     $suite = new TestSuite('All CRUD action tests');
     $path = Plugin::path('Crud');
     $testPath = $path . '/tests/TestCase';
     if (!is_dir($testPath)) {
         return $suite;
     }
     $suite->addTestDirectoryRecursive($testPath . '/Action');
     return $suite;
 }
Esempio n. 4
0
 /**
  * Runs the tests and collects their result in a TestResult.
  *
  * @param \PHPUnit_Framework_TestResult $result
  * @return \PHPUnit_Framework_TestResult
  */
 public function run(PHPUnit_Framework_TestResult $result = null, $filter = false, array $groups = [], array $excludeGroups = [], $processIsolation = false)
 {
     $permutations = ['Identifier Quoting' => function () {
         ConnectionManager::get('test')->driver()->autoQuoting(true);
     }, 'No identifier quoting' => function () {
         ConnectionManager::get('test')->driver()->autoQuoting(false);
     }];
     foreach ($permutations as $permutation) {
         $permutation();
         $result = parent::run($result, $filter, $groups, $excludeGroups, $processIsolation);
     }
     return $result;
 }
Esempio n. 5
0
 /**
  * Runs the tests and collects their result in a TestResult.
  *
  * @param \PHPUnit_Framework_TestResult $result
  * @return \PHPUnit_Framework_TestResult
  */
 public function run(PHPUnit_Framework_TestResult $result = null)
 {
     $permutations = ['Identifier Quoting' => function () {
         ConnectionManager::get('test')->driver()->autoQuoting(true);
     }, 'No identifier quoting' => function () {
         ConnectionManager::get('test')->driver()->autoQuoting(false);
     }];
     foreach ($permutations as $permutation) {
         $permutation();
         $result = parent::run($result);
     }
     return $result;
 }
Esempio n. 6
0
 public static function suite()
 {
     $suite = new TestSuite('Plugin Media');
     $suite->addTestDirectoryRecursive(TESTS . 'TestCase');
     return $suite;
 }