1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the jquery-datatables-bundle package. |
||
5 | * |
||
6 | * (c) 2021 WEBEWEB |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace WBW\Bundle\JQuery\DataTablesBundle\Tests\Renderer\DateTimes; |
||
13 | |||
14 | use DateTime; |
||
15 | use Throwable; |
||
16 | use WBW\Bundle\JQuery\DataTablesBundle\Tests\AbstractTestCase; |
||
17 | use WBW\Bundle\JQuery\DataTablesBundle\Tests\Fixtures\Renderer\DateTimes\TestDateTimeRendererTrait; |
||
18 | |||
19 | /** |
||
20 | * Date/time renderer trait test. |
||
21 | * |
||
22 | * @author webeweb <https://github.com/webeweb> |
||
23 | * @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Renderer\DateTimes |
||
24 | */ |
||
25 | class DateTimeRendererTraitTest extends AbstractTestCase { |
||
26 | |||
27 | /** |
||
28 | * Test renderDateTime() |
||
29 | * |
||
30 | * @return void |
||
31 | * @throws Throwable Throws an exception if an error occurs. |
||
32 | */ |
||
33 | public function testRenderDateTime(): void { |
||
34 | |||
35 | $obj = new TestDateTimeRendererTrait(); |
||
36 | |||
37 | $this->assertEquals("", $obj->renderDateTime(null)); |
||
0 ignored issues
–
show
|
|||
38 | $this->assertEquals("2019-01-14 18:15", $obj->renderDateTime(new DateTime("2019-01-14 18:15:00"))); |
||
39 | $this->assertEquals("14/01/2019 18h15", $obj->renderDateTime(new DateTime("2019-01-14 18:15:00"), "d/m/Y H\hi")); |
||
40 | } |
||
41 | } |
||
42 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.