Ejemplo n.º 1
0
 /**
  * set up test environment
  */
 public function setUp()
 {
     parent::setUp();
     $this->config = ConfigStub::create();
     $this->obj = new \stdClass();
     $this->obj->vendor = 'Evidev';
     $this->obj->name = 'Workbench';
     $this->obj->psr0 = 'new\\psr0///compliant\\namespace';
     $this->obj->psr0expected = addslashes('new\\psr0\\compliant\\namespace');
     $this->obj->namespace = 'new\\long///name\\space';
     $this->obj->namespaceexpected = 'new\\long\\name\\space';
     $this->obj->authors = $this->config->config()->get('workbench::composer.authors');
     $this->obj->license = $this->config->config()->get('workbench::composer.license');
 }
 public function testPackageAuthors()
 {
     $files = $this->getComposerFiles();
     $composer = $this->helper->getJSON($files['newpackage']);
     $authors = $this->config->config()->get('workbench::composer.authors');
     $this->assertCount(count($authors), $composer->authors);
     $this->assertEquals($authors[0]['name'], $composer->authors[0]->name);
     $this->assertEquals($authors[1]['email'], $composer->authors[1]->email);
 }