StubTestSuiteBase example


  public function testAddTestsBySuiteNamespaceCore($filesystem$suite_namespace$expected_tests) {
    // Set up the file system.     $vfs = vfsStream::setup('root');
    vfsStream::create($filesystem$vfs);

    // Make a stub suite base to test.     $stub = new StubTestSuiteBase('test_me');

    // Access addTestsBySuiteNamespace().     $ref_add_tests = new \ReflectionMethod($stub, 'addTestsBySuiteNamespace');

    // Invoke addTestsBySuiteNamespace().     $ref_add_tests->invokeArgs($stub[vfsStream::url('root')$suite_namespace]);

    // Determine if we loaded the expected test files.     $this->assertEquals($expected_tests$stub->testFiles);
  }

  
Home | Imprint | This part of the site doesn't use cookies.