Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tools #503

Merged
merged 2 commits into from
Dec 3, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="3.14.2@3538fe1955d47f6ee926c0769d71af6db08aa488"/>
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591"/>
2 changes: 1 addition & 1 deletion tests/BundleIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public function testStartup(): void

$client->request('GET', '/twig-test');

static::assertSame(200, $client->getResponse()->getStatusCode());
self::assertSame(200, $client->getResponse()->getStatusCode());
}
}
4 changes: 2 additions & 2 deletions tests/DependencyInjection/Compiler/MenuCompilerPassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function setUp(): void
public function testProcess(): void
{
$definition = $this->createMock(Definition::class);
$definition->expects(static::once())->method('addMethodCall')
$definition->expects(self::once())->method('addMethodCall')
->with('add', ['main'])
;

Expand All @@ -64,6 +64,6 @@ public function testProcessWithEmptyGroups(): void
$compiler = new MenuCompilerPass();
$compiler->process($this->container);

$this->registryDefinitionMock->expects(static::never())->method('addMethodCall');
$this->registryDefinitionMock->expects(self::never())->method('addMethodCall');
}
}
4 changes: 2 additions & 2 deletions tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testOptions(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}

/**
Expand Down Expand Up @@ -107,6 +107,6 @@ public function testGroupsOptions(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}
}
32 changes: 16 additions & 16 deletions tests/Menu/ConfigBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function testBuildMenuWithoutItems(): void
->willReturn($mainMenu)
;

static::assertSame($mainMenu, $builder->buildMenu([], []));
self::assertSame($mainMenu, $builder->buildMenu([], []));
}

public function testBuildMenuWithOptions(): void
Expand All @@ -85,7 +85,7 @@ public function testBuildMenuWithOptions(): void
->willReturn($mainMenu)
;

static::assertSame($mainMenu, $builder->buildMenu([], [
self::assertSame($mainMenu, $builder->buildMenu([], [
'foo' => 'bar',
]));
}
Expand All @@ -111,7 +111,7 @@ public function testBuildMenuWithMenuAttributes(): void
->willReturn($mainMenu)
;

static::assertSame($mainMenu, $builder->buildMenu([
self::assertSame($mainMenu, $builder->buildMenu([
'attributes' => [
'attr-foo' => 'custom',
],
Expand All @@ -131,11 +131,11 @@ public function testBuildMenuWithItems(): void
$item = $this->createMock(ItemInterface::class);

$mainMenu = $this->createMock(ItemInterface::class);
$mainMenu->expects(static::once())->method('addChild')
$mainMenu->expects(self::once())->method('addChild')
->with($item)
;

$this->factory->expects($matcher = static::exactly(2))->method('createItem')
$this->factory->expects($matcher = self::exactly(2))->method('createItem')
->willReturnCallback($this->withParameter($matcher, [
['main', [
'attributes' => [
Expand Down Expand Up @@ -163,7 +163,7 @@ public function testBuildMenuWithItems(): void
)
;

static::assertSame($mainMenu, $builder->buildMenu([
self::assertSame($mainMenu, $builder->buildMenu([
'items' => [
[
'label' => 'my-label',
Expand All @@ -187,11 +187,11 @@ public function testBuildMenuWithTranslation(): void
$item = $this->createMock(ItemInterface::class);

$mainMenu = $this->createMock(ItemInterface::class);
$mainMenu->expects(static::once())->method('addChild')
$mainMenu->expects(self::once())->method('addChild')
->with($item)
;

$this->factory->expects($matcher = static::exactly(2))->method('createItem')
$this->factory->expects($matcher = self::exactly(2))->method('createItem')
->willReturnCallback($this->withParameter($matcher, [
['main', [
'attributes' => [
Expand Down Expand Up @@ -222,7 +222,7 @@ public function testBuildMenuWithTranslation(): void
->willReturn('My label')
;

static::assertSame($mainMenu, $builder->buildMenu([
self::assertSame($mainMenu, $builder->buildMenu([
'items' => [
[
'label' => 'my-label',
Expand All @@ -243,11 +243,11 @@ public function testBuildMenuWithIcon(): void
$item = $this->createMock(ItemInterface::class);

$mainMenu = $this->createMock(ItemInterface::class);
$mainMenu->expects(static::once())->method('addChild')
$mainMenu->expects(self::once())->method('addChild')
->with($item)
;

$this->factory->expects($matcher = static::exactly(2))->method('createItem')
$this->factory->expects($matcher = self::exactly(2))->method('createItem')
->willReturnCallback($this->withParameter($matcher, [
['main', [
'attributes' => [
Expand All @@ -273,7 +273,7 @@ public function testBuildMenuWithIcon(): void
)
;

static::assertSame($mainMenu, $builder->buildMenu([
self::assertSame($mainMenu, $builder->buildMenu([
'items' => [
[
'label' => 'my-label',
Expand All @@ -295,16 +295,16 @@ public function testBuildMenuWithChildren(): void
);

$item = $this->createMock(ItemInterface::class);
$item->expects(static::once())->method('addChild')
$item->expects(self::once())->method('addChild')
->with($item)
;

$mainMenu = $this->createMock(ItemInterface::class);
$mainMenu->expects(static::once())->method('addChild')
$mainMenu->expects(self::once())->method('addChild')
->with($item)
;

$this->factory->expects($matcher = static::exactly(3))->method('createItem')
$this->factory->expects($matcher = self::exactly(3))->method('createItem')
->willReturnCallback($this->withParameter($matcher, [
['main', [
'attributes' => [
Expand Down Expand Up @@ -351,7 +351,7 @@ public function testBuildMenuWithChildren(): void
)
;

static::assertSame($mainMenu, $builder->buildMenu([
self::assertSame($mainMenu, $builder->buildMenu([
'items' => [
[
'label' => 'my-label',
Expand Down
6 changes: 3 additions & 3 deletions tests/NucleosMenuBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public function testGetContainerExtension(): void
{
$bundle = new NucleosMenuBundle();

static::assertInstanceOf(NucleosMenuExtension::class, $bundle->getContainerExtension());
self::assertInstanceOf(NucleosMenuExtension::class, $bundle->getContainerExtension());
}

public function testBuild(): void
{
$containerBuilder = $this->createMock(ContainerBuilder::class);

$containerBuilder->expects(static::once())->method('addCompilerPass')
->with(static::isInstanceOf(MenuCompilerPass::class))
$containerBuilder->expects(self::once())->method('addCompilerPass')
->with(self::isInstanceOf(MenuCompilerPass::class))
;

$bundle = new NucleosMenuBundle();
Expand Down
6 changes: 3 additions & 3 deletions tests/Provider/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testGet(): void
'foo' => ['name' => 'foo'],
'bar' => ['name' => 'bar'],
]);
static::assertSame($menu, $configProvider->get('foo', ['a' => 'b']));
self::assertSame($menu, $configProvider->get('foo', ['a' => 'b']));
}

public function testGetDoesNotExist(): void
Expand All @@ -63,7 +63,7 @@ public function testHas(): void
'bar' => ['name' => 'bar'],
]);

static::assertTrue($configProvider->has('foo'));
self::assertTrue($configProvider->has('foo'));
}

public function testHasNot(): void
Expand All @@ -73,6 +73,6 @@ public function testHasNot(): void
'bar' => ['name' => 'bar'],
]);

static::assertFalse($configProvider->has('baz'));
self::assertFalse($configProvider->has('baz'));
}
}
5 changes: 5 additions & 0 deletions vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@
"phpstan/extension-installer": true
},
"bin-dir": "../../vendor/bin"
},
"extra": {
"symfony": {
"require": "6.4.*"
}
}
}