/** * @covers phpDocumentor\Transformer\Transformer::execute */ public function testExecute() { // FIXME $this->markTestIncomplete(); $project = m::mock('phpDocumentor\\Descriptor\\ProjectDescriptor'); $behaviourCollection = m::mock('phpDocumentor\\Transformer\\Behaviour\\Collection'); $behaviourCollection->shouldReceive('process')->with($project); $behaviourCollection->shouldReceive('count')->andReturn(0); $transformation = m::mock('phpDocumentor\\Transformer\\Transformation')->shouldReceive('execute')->with($project)->shouldReceive('getQuery')->andReturn('')->shouldReceive('getWriter')->andReturn(new \stdClass())->shouldReceive('getArtifact')->andReturn('')->getMock(); $templateCollection = m::mock('phpDocumentor\\Transformer\\Template\\Collection'); $templateCollection->shouldReceive('getTransformations')->andReturn(array($transformation)); $writerCollectionMock = m::mock('phpDocumentor\\Transformer\\Writer\\Collection'); $writerCollectionMock->shouldIgnoreMissing(); $fixture = new Transformer($templateCollection, $writerCollectionMock); $fixture->setBehaviours($behaviourCollection); $this->assertNull($fixture->execute($project)); }