Skip to content

Commit d8bc3a1

Browse files
committed
Added test for non-model
1 parent eec17df commit d8bc3a1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/ControllerModelsExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class ControllerModelsExtensionTest extends TypeInferenceTestCase
1212
public function dataFileAsserts(): iterable
1313
{
1414
yield from $this->gatherAssertTypes(__DIR__ . '/data/existing_controller_model.php');
15+
yield from $this->gatherAssertTypes(__DIR__ . '/data/invalid_controller_model.php');
1516
}
1617

1718
/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare(strict_types = 1);
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
/** @var BasicController $controller */
8+
$model = $controller->stdClass;
9+
10+
assertType('*ERROR*', $model);

0 commit comments

Comments
 (0)