/** * @covers phpDocumentor\Descriptor\FileDescriptor::setMarkers * @covers phpDocumentor\Descriptor\FileDescriptor::getMarkers */ public function testSetAndGetMarkers() { $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $this->fixture->getMarkers()); $mockInstance = m::mock('phpDocumentor\\Descriptor\\Collection'); $mock = $mockInstance; $this->fixture->setMarkers($mock); $this->assertSame($mockInstance, $this->fixture->getMarkers()); }
/** * Registers the markers that were found in a File with the File Descriptor. * * @param string[] $markers * @param FileDescriptor $fileDescriptor * * @return void */ protected function addMarkers($markers, $fileDescriptor) { foreach ($markers as $marker) { list($type, $message, $line) = $marker; $fileDescriptor->getMarkers()->add(array('type' => $type, 'message' => $message, 'line' => $line)); } }
/** * Adds a marker with the TO DO information to the file on a given line number. * * @param FileDescriptor $fileDescriptor * @param TagDescriptor $todo * @param integer $lineNumber * * @return void */ protected function addTodoMarkerToFile($fileDescriptor, $todo, $lineNumber) { $fileDescriptor->getMarkers()->add(array('type' => 'TODO', 'message' => $todo->getDescription(), 'line' => $lineNumber)); }