phpmock\MockBuilder::build PHP Method

build() public method

Builds a mock.
public build ( ) : Mock
return Mock The mock.
    public function build()
    {
        return new Mock($this->namespace, $this->name, $this->function);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Tests redefining mocks in a different namespace.
  *
  * @test
  * @dataprovider provideTestNamespace
  */
 public function testRedefiningNamespaces()
 {
     $this->builder->setNamespace(__NAMESPACE__);
     $this->mock = $this->builder->build();
     $this->mock->enable();
     $this->assertEquals(1234, time());
 }
All Usage Examples Of phpmock\MockBuilder::build