<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
heimrichhannot / contao-test-utilities-bundle example snippets
class Test {
use \HeimrichHannot\TestUtilitiesBundle\Mock\ModelMockTrait;
use \HeimrichHannot\TestUtilitiesBundle\Mock\TemplateMockTrait;
public function testMockTemplate() {
$templateMock = $this->mockTemplateObject(\Contao\FrontendTemplate::class, 'ce_test');
$templateMock->setName('ce_skip');
$templateMock->getName();
$templateMock->setData(['foo' => 'bar']);
$templateMock->getData();
// and __get, __set, __isset
}
public function testModelMock() {
$model = $this->mockModelObject(\Contao\PageModel::class, []);
$model->row();
// and __get, __set, __isset
}
}