| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Tests\Unit\Service\Export\Model;
- use App\Service\Export\Model\LicenceCmf;
- use App\Service\Export\Model\LicenceCmfCollection;
- use PHPUnit\Framework\TestCase;
- class LicenceCmfCollectionTest extends TestCase
- {
- /**
- * @see LicenceCmf::getLicences()
- * @see LicenceCmf::addLicence()
- * @see LicenceCmf::setLicences()
- */
- public function testSetters(): void {
- $collection = new LicenceCmfCollection();
- $model = $this->getMockBuilder(LicenceCmf::class)->getMock();
- $this->assertEquals([], $collection->getLicences());
- $collection->addLicence($model);
- $this->assertEquals([$model], $collection->getLicences());
- $collection->setLicences([]);
- $this->assertEquals([], $collection->getLicences());
- }
- }
|