This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Components/Form/Renderer/RendererTestCase.php

24 lines
722 B
PHP

<?php
namespace Symfony\Tests\Components\Form\Renderer;
abstract class RendererTestCase extends \PHPUnit_Framework_TestCase
{
protected function createFieldMock($name, $id, $displayedData)
{
$field = $this->getMock('Symfony\Components\Form\FieldInterface');
$field->expects($this->any())
->method('getDisplayedData')
->will($this->returnValue($displayedData));
$field->expects($this->any())
->method('getName')
->will($this->returnValue($name));
$field->expects($this->any())
->method('getId')
->will($this->returnValue($id));
return $field;
}
}