/** * @covers phpDocumentor\Descriptor\DescriptorAbstract::getCopyright */ public function testGetCopyRight() { $mock = m::mock('phpDocumentor\\Descriptor\\DescriptorAbstract, phpDocumentor\\Descriptor\\Interfaces\\ChildInterface'); $mock->shouldDeferMissing(); $copyright = new Collection(array('copyright')); $collection = new Collection(); $collection->offsetSet('copyright', $copyright); $mock->shouldReceive('getTags')->andReturn($collection); $this->assertSame($copyright, $mock->getCopyright()); }
/** * @covers phpDocumentor\Descriptor\Collection::offsetSet * @expectedException \InvalidArgumentException */ public function testSetItemsUsingOffsetSetWithEmptyKeyShouldThrowException() { $this->fixture->offsetSet('', 'abc'); }