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

testExecuteWithConfigFolder() public method

    public function testExecuteWithConfigFolder()
    {
        $this->deleteDir($webDir = __DIR__ . '/fixtures/config-folder/web');
        $application = $this->runApplication(dirname($webDir));
        $this->assertSame(0, $application->getStatusCode());
        $this->assertTrue(file_exists($webDir . '/2010/01/01/hello.html'));
        $crawler = new Crawler(file_get_contents($webDir . '/2010/01/01/hello.html'));
        $this->assertSame('Hello', $crawler->filter('title')->text());
        $this->assertSame('Hello', $crawler->filter('h1')->text());
        $this->assertTrue(file_exists($webDir . '/2010/01/02/post2.html'));
        $this->assertTrue(file_exists($webDir . '/2010/01/03/post3.html'));
        $this->assertTrue(file_exists($webDir . '/2010/01/04/good-bye.html'));
        $this->deleteDir($webDir);
    }