Exemplo n.º 1
0
 /**
  * Returns the list of mock objects associated with the current test.
  *
  * @param array $constructorArgs
  * @return object[]
  */
 public function getMocks(array $constructorArgs = array())
 {
     if ($this->mocks === null) {
         $mockBuilder = new MockBuilder($this);
         $this->mocks = $mockBuilder->getMocks($constructorArgs);
     }
     return $this->mocks;
 }
Exemplo n.º 2
0
 public function testGetMocksWithUndefinedFile()
 {
     $mockBuilder = new MockBuilder(new Test(new ReflectionMethod(__CLASS__, __FUNCTION__)));
     $this->setExpectedException('RuntimeException', 'File not found');
     $this->assertInstanceOf('TRex\\core\\Objects', $mockBuilder->getMocks());
 }