Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions system/Images/Handlers/BaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* Base image handling implementation.
*
* @template T of object
*
* @method string getPathname()
*/
abstract class BaseHandler implements ImageHandlerInterface
{
Expand Down
6 changes: 2 additions & 4 deletions tests/system/CodeIgniterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected function setUp(): void
$this->codeigniter = new MockCodeIgniter(new App());

$response = service('response');
$this->assertInstanceOf(Response::class, $response);
$response->pretend();
}

Expand Down Expand Up @@ -985,10 +986,7 @@ public function testStartControllerPermitsInvoke(): void
$startController = self::getPrivateMethodInvoker($this->codeigniter, 'startController');

$this->setPrivateProperty($this->codeigniter, 'method', '__invoke');
$startController();

// No PageNotFoundException
$this->expectNotToPerformAssertions();
$this->assertNull($startController());
}

public function testRouteAttributeCacheIntegration(): void
Expand Down
15 changes: 12 additions & 3 deletions tests/system/Images/GDHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,12 @@ public function testImageCopy(): void
$this->handler->save($this->start . 'work/ci-logo.' . $type);
$this->assertTrue($this->root->hasChild('work/ci-logo.' . $type));

/** @var vfsStreamFile $child */
$child = $this->root->getChild('work/ci-logo.' . $type);

$this->assertNotSame(
file_get_contents($this->origin . 'ci-logo.' . $type),
$this->root->getChild('work/ci-logo.' . $type)->getContent(),
$child->getContent(),
);
}
}
Expand Down Expand Up @@ -380,9 +383,12 @@ public function testImageCompressionGetResource(): void
$this->handler->save($this->start . 'work/ci-logo.' . $type);
$this->assertTrue($this->root->hasChild('work/ci-logo.' . $type));

/** @var vfsStreamFile $child */
$child = $this->root->getChild('work/ci-logo.' . $type);

$this->assertNotSame(
file_get_contents($this->origin . 'ci-logo.' . $type),
$this->root->getChild('work/ci-logo.' . $type)->getContent(),
$child->getContent(),
);
}
}
Expand All @@ -401,9 +407,12 @@ public function testImageCompressionWithResource(): void

$this->assertTrue($this->root->hasChild('work/ci-logo.' . $type));

/** @var vfsStreamFile $child */
$child = $this->root->getChild('work/ci-logo.' . $type);

$this->assertNotSame(
file_get_contents($this->origin . 'ci-logo.' . $type),
$this->root->getChild('work/ci-logo.' . $type)->getContent(),
$child->getContent(),
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Models/FindModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function testFindClearsBinds(): void
$binds = $this->model->builder()->getBinds();
$this->assertCount(0, $binds);

$query = $this->model->getLastQuery();
$query = $this->model->db->getLastQuery();
$this->assertCount(1, $this->getPrivateProperty($query, 'binds'));
}

Expand Down
3 changes: 2 additions & 1 deletion tests/system/Models/GeneralModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function testUndefinedModelMethod(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('Call to undefined method Tests\Support\Models\UserModel::undefinedMethodCall');
$this->createModel(UserModel::class)->undefinedMethodCall();

$this->createModel(UserModel::class)->undefinedMethodCall(); // @phpstan-ignore method.notFound (Testing Model::__call() fallback)
}

public function testSetAllowedFields(): void
Expand Down
1 change: 1 addition & 0 deletions tests/system/RESTful/ResourceControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private function createCodeigniter(): void
$this->codeigniter = new MockCodeIgniter($config);

$response = service('response');
$this->assertInstanceOf(Response::class, $response);
$response->pretend();
}

Expand Down
1 change: 0 additions & 1 deletion utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ includes:
- function.resultUnused.neon
- method.childParameterType.neon
- method.childReturnType.neon
- method.notFound.neon
- missingType.iterableValue.neon
- property.defaultValue.neon
- property.phpDocType.neon
33 changes: 0 additions & 33 deletions utils/phpstan-baseline/method.notFound.neon

This file was deleted.

Loading