Run phpunit code quality rector

This commit is contained in:
Jan Böhmer 2025-07-14 00:38:54 +02:00
parent f215bd11cd
commit f3ad3c1ffe
15 changed files with 66 additions and 70 deletions

View file

@ -231,7 +231,7 @@ class AttachmentTest extends TestCase
//Ensure that changing the external path does reset the internal one
$attachment->setInternalPath('%MEDIA%/foo/bar.txt');
$attachment->setExternalPath('https://example.de');
$this->assertSame(null, $attachment->getInternalPath());
$this->assertNull($attachment->getInternalPath());
//Ensure that setting the same value to the external path again doesn't reset the internal one
$attachment->setExternalPath('https://google.de');

View file

@ -41,7 +41,7 @@ class PartTest extends TestCase
$lot = new PartLot();
$part->addPartLot($lot);
$this->assertSame($part, $lot->getPart());
$this->assertSame(1, $part->getPartLots()->count());
$this->assertCount(1, $part->getPartLots());
//Remove element
$part->removePartLot($lot);

View file

@ -38,7 +38,7 @@ class OrderdetailTest extends TestCase
$pricedetail = new Pricedetail();
$orderdetail->addPricedetail($pricedetail);
$this->assertSame($orderdetail, $pricedetail->getOrderdetail());
$this->assertSame(1, $orderdetail->getPricedetails()->count());
$this->assertCount(1, $orderdetail->getPricedetails());
//After removal of the pricedetail, the orderdetail must be empty again
$orderdetail->removePricedetail($pricedetail);

View file

@ -35,7 +35,7 @@ class ApiTokenTypeTest extends TestCase
public function testGetTypeFromToken(): void
{
$this->assertEquals(ApiTokenType::PERSONAL_ACCESS_TOKEN, ApiTokenType::getTypeFromToken('tcp_123'));
$this->assertSame(ApiTokenType::PERSONAL_ACCESS_TOKEN, ApiTokenType::getTypeFromToken('tcp_123'));
}
public function testGetTypeFromTokenInvalid(): void