File manager - Edit - /home/premiey/www/wp-content/plugins/wp-whatsapp-chat/vendor/franmastromarino/wp-orm/tests/Single/SingleRepositoryTest.php
Back
<?php namespace QuadLayers\WP_Orm\Tests\Single\Repository; use PHPUnit\Framework\TestCase; use QuadLayers\WP_Orm\Repository\SingleRepositoryInterface; use QuadLayers\WP_Orm\Tests\Single\SingleEntityTest; class SingleRepositoryTest extends TestCase { private SingleRepositoryInterface $repository; protected function setUp(): void { $this->repository = $this->createMock(SingleRepositoryInterface::class); } public function testSave() { $entity = new SingleEntityTest(); $testValue = $entity->getDefaults(); $this->repository ->expects($this->once()) ->method('create') ->with($testValue) ->willReturn(true); $this->repository->create($testValue); } public function testFind() { $entity = new SingleEntityTest(); $this->repository ->expects($this->once()) ->method('find') ->with(); $this->repository ->expects($this->once()) ->method('find') ->willReturn($entity); $this->repository->find(); } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings