Fixed typos

This commit is contained in:
Jan Böhmer 2023-04-15 23:14:53 +02:00
parent 63df16a369
commit d04d743520
144 changed files with 263 additions and 265 deletions

View file

@ -42,7 +42,7 @@ class AttachmentPathResolverTest extends WebTestCase
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->projectDir_orig = realpath(self::$kernel->getProjectDir());
@ -117,7 +117,7 @@ class AttachmentPathResolverTest extends WebTestCase
//Every kind of absolute path, that is not based with our placeholder dirs must be invald
['/etc/passwd', null],
['C:\\not\\existing.txt', null],
//More then one placeholder is not allowed
//More than one placeholder is not allowed
[$this->footprint_path.'/test/'.$this->footprint_path, null],
//Path must begin with path
['/not/root'.$this->footprint_path, null],

View file

@ -33,7 +33,7 @@ class AttachmentURLGeneratorTest extends WebTestCase
public static function setUpBeforeClass(): void
{
//Get an service instance.
//Get a service instance.
self::bootKernel();
self::$service = self::getContainer()->get(AttachmentURLGenerator::class);
}

View file

@ -38,7 +38,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase
public static function setUpBeforeClass(): void
{
//Get an service instance.
//Get a service instance.
self::bootKernel();
self::$service = self::getContainer()->get(BuiltinAttachmentsFinder::class);
}

View file

@ -38,7 +38,7 @@ class AmountFormatterTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(AmountFormatter::class);
}

View file

@ -38,14 +38,14 @@ class BOMImporterTest extends WebTestCase
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(BOMImporter::class);
}
public function testImportFileIntoProject(): void
{
$inpute = $input = <<<CSV
$input = <<<CSV
"ID";"Bezeichner";"Footprint";"Stückzahl";"Bezeichnung";"Anbieter und Referenz";
1;"R19,R17";"R_0805_2012Metric_Pad1.20x1.40mm_HandSolder";2;"4.7k";Test;;
2;"D1";"D_DO-41_SOD81_P10.16mm_Horizontal";1;"1N5059";;;

View file

@ -44,7 +44,7 @@ class EntityImporterTest extends WebTestCase
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(EntityImporter::class);
}
@ -112,7 +112,7 @@ EOT;
$parent = new AttachmentType();
$results = $this->service->massCreation($input, AttachmentType::class, $parent, $errors);
//We have 7 elements, an now errros
//We have 7 elements, and 0 errors
$this->assertCount(0, $errors);
$this->assertCount(7, $results);

View file

@ -62,7 +62,7 @@ class LabelTextReplacerTest extends WebTestCase
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(LabelTextReplacer::class);

View file

@ -139,5 +139,7 @@ class SandboxedTwigProviderTest extends WebTestCase
'lot' => new PartLot(),
'location' => new Storelocation(),
]);
$this->assertIsString($str);
}
}

View file

@ -55,7 +55,7 @@ class EventCommentHelperTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(EventCommentHelper::class);
}

View file

@ -58,7 +58,7 @@ class EventLoggerTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(EventLogger::class);
}

View file

@ -36,7 +36,7 @@ class FAIconGeneratorTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(FAIconGenerator::class);
}

View file

@ -52,7 +52,7 @@ class ParameterExtractorTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(ParameterExtractor::class);
}

View file

@ -47,7 +47,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PartLotWithdrawAddHelper::class);

View file

@ -39,7 +39,7 @@ class PricedetailHelperTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PricedetailHelper::class);
}

View file

@ -44,7 +44,7 @@ class TreeViewGeneratorTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(TreeViewGenerator::class);
$this->em = self::getContainer()->get(EntityManagerInterface::class);
@ -99,7 +99,7 @@ class TreeViewGeneratorTest extends WebTestCase
//First element should link to new category
$this->assertStringContainsStringIgnoringCase('New', $tree[0]->getText());
$this->assertSame('/en/category/new', $tree[0]->getHref());
//By default the new element node is selected
//By default, the new element node is selected
$this->assertTrue($tree[0]->getState()->getSelected());
//Next element is spacing

View file

@ -45,7 +45,7 @@ class PermissionManagerTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
//Get an service instance.
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PermissionManager::class);
@ -155,7 +155,7 @@ class PermissionManagerTest extends WebTestCase
public function testInherit(): void
{
//Not inherited values should be same as dont inherit:
//Not inherited values should be same as don't inherit:
$this->assertTrue($this->service->inherit($this->user, 'parts', 'read'));
$this->assertFalse($this->service->inherit($this->user, 'parts', 'edit'));
//When thing can not be resolved null should be returned

View file

@ -90,7 +90,7 @@ class PermissionSchemaUpdaterTest extends WebTestCase
$perm_data->setPermissionValue('parts', 'edit', PermissionData::ALLOW);
$user = new TestPermissionHolder($perm_data);
//Do an upgrade and afterwards the move, add, and withdraw permissions should be set to ALLOW
//Do an upgrade and afterward the move, add, and withdraw permissions should be set to ALLOW
self::assertTrue($this->service->upgradeSchema($user, 1));
self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'move'));
self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'add'));

View file

@ -68,7 +68,7 @@ class BackupCodeManagerTest extends WebTestCase
{
$user = new User();
//By default nothing other 2FA is activated, so the backup codes should be disabled
//By default, nothing other 2FA is activated, so the backup codes should be disabled
$codes = ['aaaa', 'bbbb'];
$user->setBackupCodes($codes);
$this->service->disableBackupCodesIfUnused($user);