/** * 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'); }
/** * set up test environment */ public function setUp() { parent::setUp(); $this->helper = Helper::create(); $this->app = array('path.base' => vfsStream::setup('workbench')->url(), 'config' => ConfigStub::create()->config()); $this->meta = array('vendor' => 'Vendor', 'name' => 'Package', 'package' => 'vendor/package'); $this->meta['namespace'] = $this->meta['vendor'] . '\\\\' . $this->meta['name']; }
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); }