public function testConstructorWithOptions() { $this->tag->setOptions(array('url' => 'foo', 'licenseName' => 'bar')); $tagWithOptionsFromConstructor = new LicenseTag('foo', 'bar'); $this->assertEquals($this->tag->generate(), $tagWithOptionsFromConstructor->generate()); }
public function testCanGenerateLicenseTag() { $tag = new LicenseTag(array('url' => 'http://test.license.com', 'description' => 'Test License')); $this->assertEquals('@license http://test.license.com Test License', $tag->generate()); }
public function testLicenseProducesCorrectDocBlockLine() { $this->tag->setUrl('foo'); $this->tag->setLicenseName('bar bar bar'); $this->assertEquals('@license foo bar bar bar', $this->tag->generate()); }