Skip to content

Commit

Permalink
Debug the issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 14, 2023
1 parent 0ccbebf commit 95b066a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 52 deletions.
4 changes: 2 additions & 2 deletions src/Model/Behavior/FileStorageBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ protected function checkEntityBeforeSave(EntityInterface $entity): void
return;
}

//$entity->variants = [];
//$entity->metadata = [];
$entity->variants = [];
$entity->metadata = [];
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Model/Table/FileStorageTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Cake\Core\Configure;
use Cake\Database\Schema\TableSchemaInterface;
use Cake\ORM\Table;
use FileStorage\Database\Type\ArrayType;

/**
* FileStorageTable
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/FileStorageTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Cake\ORM\Locator\LocatorAwareTrait;
use Cake\TestSuite\TestCase;
use FileStorage\Filesystem\Folder;
use FileStorage\Model\Table\FileStorageTable;
use Intervention\Image\ImageManager;
use PhpCollective\Infrastructure\Storage\Factories\LocalFactory;
use PhpCollective\Infrastructure\Storage\FileStorage;
Expand Down Expand Up @@ -80,7 +81,7 @@ public function setUp(): void

$this->FileStorage = $this
->getTableLocator()
->get(FileStorageTestTable::class);
->get(FileStorageTable::class);
}

/**
Expand Down
47 changes: 0 additions & 47 deletions tests/TestCase/FileStorageTestTable.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/TestCase/Model/Behavior/FileStorageBehaviorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use ArrayObject;
use Cake\Core\Configure;
use Cake\Event\Event;
use FileStorage\Model\Table\FileStorageTable;
use FileStorage\Test\TestCase\FileStorageTestCase;
use FileStorage\Test\TestCase\FileStorageTestTable;
use Laminas\Diactoros\UploadedFile;

/**
Expand Down Expand Up @@ -37,7 +37,7 @@ public function setUp(): void
parent::setUp();

$this->getTableLocator()->clear();
$this->FileStorage = $this->getTableLocator()->get(FileStorageTestTable::class);
$this->FileStorage = $this->getTableLocator()->get(FileStorageTable::class);

$this->FileStorage->addBehavior(
'FileStorage.FileStorage',
Expand Down
3 changes: 3 additions & 0 deletions tests/TestCase/Model/Entity/FileStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

class FileStorageTest extends FileStorageTestCase
{
/**
* @return void
*/
public function testNew(): void
{
$image = $this->FileStorage->newEntity([
Expand Down

0 comments on commit 95b066a

Please sign in to comment.