Eccube\Tests\Web\Admin\Content\FileControllerTest::testDelete PHP Method

testDelete() public method

public testDelete ( )
    public function testDelete()
    {
        $filepath = $this->app['config']['user_data_realdir'] . '/aaa.html';
        $contents = '<html><body><h1>test</h1></body></html>';
        file_put_contents($filepath, $contents);
        $this->client->request('DELETE', $this->app->path('admin_content_file_delete') . '?select_file=' . $filepath);
        $this->assertTrue($this->client->getResponse()->isRedirect($this->app->url('admin_content_file')));
        $this->assertFalse(file_exists($filepath));
    }