Carew\Tests\Command\BuildTest::testExecuteWithConfigTheme PHP Method

testExecuteWithConfigTheme() public method

    public function testExecuteWithConfigTheme()
    {
        $this->deleteDir($webDir = __DIR__ . '/fixtures/theme/web');
        $application = $this->runApplication(dirname($webDir));
        $this->assertSame(0, $application->getStatusCode());
        $this->assertTrue(file_exists($webDir . '/2010/01/01/local-layout.html'));
        $this->assertSame('local:local-layout', trim(file_get_contents($webDir . '/2010/01/01/local-layout.html')));
        $this->assertTrue(file_exists($webDir . '/2010/01/02/vendor-layout.html'));
        $this->assertSame('vendor:vendor-layout', trim(file_get_contents($webDir . '/2010/01/02/vendor-layout.html')));
        $this->assertTrue(file_exists($webDir . '/2010/01/03/default-extends.html'));
        $crawler = new Crawler(file_get_contents($webDir . '/2010/01/03/default-extends.html'));
        $this->assertSame('default-extends', $crawler->filter('title')->text());
        $this->assertSame('title:Default-extends', $crawler->filter('h1')->text());
        $this->assertSame('Should be wrapped into a div', trim($crawler->filter('div.body')->text()));
    }