Skip to content

Commit

Permalink
BlogController (#2827)
Browse files Browse the repository at this point in the history
  • Loading branch information
nghiem-mb authored Oct 27, 2023
1 parent 92960e9 commit bf04638
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use BaserCore\Test\Scenario\InitAppScenario;
use BaserCore\Test\Factory\SiteConfigFactory;
use BaserCore\TestSuite\BcTestCase;
use BaserCore\Utility\BcFile;
use BcBlog\Controller\BlogController;
use BcBlog\Service\BlogContentsServiceInterface;
use BcBlog\Service\BlogPostsServiceInterface;
Expand All @@ -28,7 +29,6 @@
use Cake\Datasource\Exception\RecordNotFoundException;
use Cake\TestSuite\IntegrationTestTrait;
use CakephpFixtureFactories\Scenario\ScenarioAwareTrait;
use Cake\Filesystem\File;

/**
* Class BlogControllerTest
Expand Down Expand Up @@ -106,9 +106,8 @@ public function test_index()
if (!file_exists($fullPath)){
mkdir($fullPath, recursive: true);
}
$file = new File($fullPath .DS. 'index.php');
$file = new BcFile($fullPath .DS. 'index.php');
$file->write('html');
$file->close();
//正常系実行
$request = $this->getRequest()->withAttribute('currentContent', ContentFactory::get(1));
$controller = new BlogController($request);
Expand Down

0 comments on commit bf04638

Please sign in to comment.