1 | <?php |
||
3 | namespace Dynamic\DynamicBlocks\Test; |
||
4 | |||
5 | use Dynamic\DynamicBlocks\Model\PhotoGalleryBlockImage; |
||
6 | use SilverStripe\Dev\SapphireTest; |
||
7 | use SilverStripe\Forms\FieldList; |
||
8 | use SilverStripe\Security\Member; |
||
9 | |||
10 | class PhotoGalleryBlockImageTest extends SapphireTest |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml'; |
||
16 | |||
17 | /** |
||
18 | * |
||
19 | */ |
||
20 | public function testGetCMSFields() |
||
27 | |||
28 | /** |
||
29 | * |
||
30 | */ |
||
31 | public function testCanView() |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | */ |
||
43 | public function testCanEdit() |
||
51 | |||
52 | /** |
||
53 | * |
||
54 | */ |
||
55 | public function testCanDelete() |
||
63 | |||
64 | /** |
||
65 | * |
||
66 | */ |
||
67 | public function testCanCreate() |
||
68 | { |
||
69 | $object = $this->objFromFixture(PhotoGalleryBlockImage::class, 'one'); |
||
76 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.