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

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

public testCreateFile ( )
    public function testCreateFile()
    {
        $this->setRequest(Request::create('/async/file/create', 'POST', ['namespace' => self::FILESYSTEM, 'parentPath' => '', 'filename' => self::FILE_NAME]));
        $response = $this->controller()->createFile($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::FILE_NAME));
    }