Bolt\Tests\Controller\Async\FilesystemManagerTest::testCreateFolder PHP Метод

testCreateFolder() публичный Метод

public testCreateFolder ( )
    public function testCreateFolder()
    {
        $this->setRequest(Request::create('/async/folder/create', 'POST', ['namespace' => self::FILESYSTEM, 'parent' => '', 'foldername' => self::FOLDER_NAME]));
        $response = $this->controller()->createFolder($this->getRequest());
        $this->assertInstanceOf(JsonResponse::class, $response);
        $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
        // Test whether the new folder actually exists
        $this->assertTrue($this->getService('filesystem')->has(self::FILESYSTEM . '://' . self::FOLDER_NAME));
    }