Skip to content

Commit

Permalink
Merge pull request #108 from thecodingmachine/dependabot/composer/php…
Browse files Browse the repository at this point in the history
…unit/phpunit-tw-7.5.9or-tw-8.0.0

Update phpunit/phpunit requirement from ^7.5.9 to ^7.5.9 || ^8.0.0
  • Loading branch information
moufmouf committed Jul 9, 2019
2 parents e339be7 + 897e11e commit 35fb733
Show file tree
Hide file tree
Showing 49 changed files with 181 additions and 179 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ website/i18n/*
/tests/dependencies/graphqlite-bundle/
/tests/dependencies/graphqlite-laravel/
/tests/dependencies/graphqlite-universal-service-provider/

.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ocramius/package-versions": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "^7.5.9",
"phpunit/phpunit": "^8.2.4",
"php-coveralls/php-coveralls": "^2.1",
"mouf/picotainer": "^1.1",
"phpstan/phpstan": "^0.11",
Expand Down
2 changes: 1 addition & 1 deletion tests/AggregateControllerQueryProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class AggregateControllerQueryProviderTest extends AbstractQueryProviderTest
{
public function testAggregate()
public function testAggregate(): void
{
$controller = new TestController();

Expand Down
4 changes: 2 additions & 2 deletions tests/AggregateQueryProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function getMutations(): array
};
}

public function testGetMutations()
public function testGetMutations(): void
{
$aggregateQueryProvider = new AggregateQueryProvider([$this->getMockQueryProvider(), $this->getMockQueryProvider()]);
$this->assertCount(2, $aggregateQueryProvider->getMutations());
Expand All @@ -33,7 +33,7 @@ public function testGetMutations()
$this->assertCount(0, $aggregateQueryProvider->getMutations());
}

public function testGetQueries()
public function testGetQueries(): void
{
$aggregateQueryProvider = new AggregateQueryProvider([$this->getMockQueryProvider(), $this->getMockQueryProvider()]);
$this->assertCount(2, $aggregateQueryProvider->getQueries());
Expand Down
32 changes: 16 additions & 16 deletions tests/AnnotationReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,101 +17,101 @@

class AnnotationReaderTest extends TestCase
{
public function testBadConstructor()
public function testBadConstructor(): void
{
$this->expectException(InvalidArgumentException::class);
new AnnotationReader(new DoctrineAnnotationReader(), 'foo');
}

public function testStrictMode()
public function testStrictMode(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::STRICT_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getTypeAnnotation(new ReflectionClass(ClassWithInvalidClassAnnotation::class));
}

public function testLaxModeWithBadAnnotation()
public function testLaxModeWithBadAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$type = $annotationReader->getTypeAnnotation(new ReflectionClass(ClassWithInvalidClassAnnotation::class));
$this->assertNull($type);
}

public function testLaxModeWithSmellyAnnotation()
public function testLaxModeWithSmellyAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getTypeAnnotation(new ReflectionClass(ClassWithInvalidTypeAnnotation::class));
}

public function testLaxModeWithBadAnnotationAndStrictNamespace()
public function testLaxModeWithBadAnnotationAndStrictNamespace(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, ['TheCodingMachine\\GraphQLite\\Fixtures']);

$this->expectException(AnnotationException::class);
$annotationReader->getTypeAnnotation(new ReflectionClass(ClassWithInvalidClassAnnotation::class));
}

public function testGetAnnotationsStrictMode()
public function testGetAnnotationsStrictMode(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::STRICT_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getClassAnnotations(new ReflectionClass(ClassWithInvalidClassAnnotation::class), Type::class);
}

public function testGetAnnotationsLaxModeWithBadAnnotation()
public function testGetAnnotationsLaxModeWithBadAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$types = $annotationReader->getClassAnnotations(new ReflectionClass(ClassWithInvalidClassAnnotation::class), Type::class);
$this->assertSame([], $types);
}

public function testGetAnnotationsLaxModeWithSmellyAnnotation()
public function testGetAnnotationsLaxModeWithSmellyAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getClassAnnotations(new ReflectionClass(ClassWithInvalidTypeAnnotation::class), Type::class);
}

public function testGetAnnotationsLaxModeWithBadAnnotationAndStrictNamespace()
public function testGetAnnotationsLaxModeWithBadAnnotationAndStrictNamespace(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, ['TheCodingMachine\\GraphQLite\\Fixtures']);

$this->expectException(AnnotationException::class);
$annotationReader->getClassAnnotations(new ReflectionClass(ClassWithInvalidClassAnnotation::class), Type::class);
}

public function testMethodStrictMode()
public function testMethodStrictMode(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::STRICT_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getRequestAnnotation(new ReflectionMethod(ClassWithInvalidClassAnnotation::class, 'testMethod'), Field::class);
}

public function testMethodLaxModeWithBadAnnotation()
public function testMethodLaxModeWithBadAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$type = $annotationReader->getRequestAnnotation(new ReflectionMethod(ClassWithInvalidClassAnnotation::class, 'testMethod'), Field::class);
$this->assertNull($type);
}

public function testMethodLaxModeWithSmellyAnnotation()
public function testMethodLaxModeWithSmellyAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getRequestAnnotation(new ReflectionMethod(ClassWithInvalidTypeAnnotation::class, 'testMethod'), Field::class);
}

public function testExtendAnnotationException()
public function testExtendAnnotationException(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::STRICT_MODE, []);

Expand All @@ -120,23 +120,23 @@ public function testExtendAnnotationException()
$annotationReader->getExtendTypeAnnotation(new ReflectionClass(ClassWithInvalidExtendTypeAnnotation::class));
}

public function testMethodsStrictMode()
public function testMethodsStrictMode(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::STRICT_MODE, []);

$this->expectException(AnnotationException::class);
$annotationReader->getMethodAnnotations(new ReflectionMethod(ClassWithInvalidClassAnnotation::class, 'testMethod'), Field::class);
}

public function testMethodsLaxModeWithBadAnnotation()
public function testMethodsLaxModeWithBadAnnotation(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, []);

$type = $annotationReader->getMethodAnnotations(new ReflectionMethod(ClassWithInvalidClassAnnotation::class, 'testMethod'), Field::class);
$this->assertSame([], $type);
}

public function testGetMethodsAnnotationsLaxModeWithBadAnnotationAndStrictNamespace()
public function testGetMethodsAnnotationsLaxModeWithBadAnnotationAndStrictNamespace(): void
{
$annotationReader = new AnnotationReader(new DoctrineAnnotationReader(), AnnotationReader::LAX_MODE, ['TheCodingMachine\\GraphQLite\\Fixtures']);

Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/AutowireTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class AutowireTest extends TestCase
{

public function testException()
public function testException(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('The @Autowire annotation must be passed a target. For instance: "@Autowire(for="$myService")"');
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/DecorateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class DecorateTest extends TestCase
{

public function testException()
public function testException(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('The @Decorate annotation must be passed an input type. For instance: "@Decorate("MyInputType")"');
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/ExtendTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ExtendTypeTest extends TestCase
{

public function testException()
public function testException(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('In annotation @ExtendType, missing one of the compulsory parameter "class" or "name".');
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class FactoryTest extends TestCase
{

public function testExceptionInConstruct()
public function testExceptionInConstruct(): void
{
$this->expectException(GraphQLException::class);
new Factory(['default'=>false]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/FailWithTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class FailWithTest extends TestCase
{

public function testException()
public function testException(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('The @FailWith annotation must be passed a defaultValue. For instance: "@FailWith(null)"');
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/MiddlewareAnnotationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class MiddlewareAnnotationsTest extends TestCase
{

public function testGetAnnotationByTypeException()
public function testGetAnnotationByTypeException(): void
{
$annotations = new MiddlewareAnnotations([
new Logged(),
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/ParameterAnnotationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class ParameterAnnotationsTest extends TestCase
{

public function testGetAnnotationByTypeException()
public function testGetAnnotationByTypeException(): void
{
$annotations = new ParameterAnnotations([
new Autowire(['for'=>'foo']),
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/RightTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class RightTest extends TestCase
{

public function testException()
public function testException(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('The @Right annotation must be passed a right name. For instance: "@Right(\'my_right\')"');
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/SourceFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class SourceFieldTest extends TestCase
{

public function testExceptionInConstruct()
public function testExceptionInConstruct(): void
{
$this->expectException(BadMethodCallException::class);
new SourceField([]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotations/UseInputTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class UseInputTypeTest extends TestCase
{

public function testException()
public function testException(): void
{
$this->expectException(BadMethodCallException::class);
$this->expectExceptionMessage('The @UseInputType annotation must be passed a target and an input type. For instance: "@UseInputType(for="$input", inputType="MyInputType")"');
Expand Down
6 changes: 3 additions & 3 deletions tests/Containers/BasicAutoWiringContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function has($id)
};
}

public function testFromContainer()
public function testFromContainer(): void
{
$container = $this->buildAutoWiringContainer($this->getContainer());

Expand All @@ -36,7 +36,7 @@ public function testFromContainer()
$this->assertSame('foo', $container->get('foo'));
}

public function testInstantiate()
public function testInstantiate(): void
{
$container = $this->buildAutoWiringContainer($this->getContainer());

Expand All @@ -47,7 +47,7 @@ public function testInstantiate()
$this->assertTrue($container->has(TestType::class));
}

public function testNotFound()
public function testNotFound(): void
{
$container = $this->buildAutoWiringContainer($this->getContainer());
$this->expectException(NotFoundException::class);
Expand Down
2 changes: 1 addition & 1 deletion tests/Containers/EmptyContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class EmptyContainerTest extends TestCase
{
public function testContainer()
public function testContainer(): void
{
$container = new EmptyContainer();
$this->assertFalse($container->has('foo'));
Expand Down
Loading

0 comments on commit 35fb733

Please sign in to comment.