public function testComposerInit() { $composerFile = './composer.json'; $this->assertJson(file_get_contents($composerFile)); Initbootstrap::initComposer(); $composer = json_decode(file_get_contents($composerFile)); $names = array('wp-bootstrap', 'wp-install', 'wp-setup', 'wp-import', 'wp-export', 'wp-init'); foreach ($names as $name) { $this->assertTrue(isset($composer->scripts->{$name})); } }
public function testTestmode() { $local = './localsettings.json'; @unlink($local); Initbootstrap::init(); $localSettings = new Settings('local'); $localSettings->wppath_test = 'foobar'; file_put_contents($local, $localSettings->toString()); define('TESTMODE', true); $localSettings = new Settings('local'); //print_r($localSettings); $this->assertEquals('foobar', $localSettings->wppath); }