Skip to content

Commit 6597899

Browse files
committed
Added tests for GraphQlResolverUsageLinemarker
1 parent 1336187 commit 6597899

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\CatalogGraphQl\Model\Resolver;
8+
9+
class ClassNotConfiguredInSchema
10+
{
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\CatalogGraphQl\Model\Resolver;
8+
9+
use Magento\Framework\GraphQl\Query\ResolverInterface;
10+
11+
class ImplementsResolverInterface implements ResolverInterface
12+
{
13+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.linemarker.php;
7+
8+
import com.magento.idea.magento2plugin.linemarker.LinemarkerFixtureTestCase;
9+
10+
public class GraphQlResolverUsageLinemarkerRegistrarTest extends LinemarkerFixtureTestCase {
11+
public void testResolverClassShouldHaveLinemarker() {
12+
myFixture.configureByFile(this.getFixturePath("Resolver.php", "php"));
13+
14+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to schema", "/icons/graphqlFile.svg");
15+
}
16+
17+
public void testRegularClassShouldNotHaveLinemarker() {
18+
myFixture.configureByFile(this.getFixturePath("ClassNotConfiguredInSchema.php", "php"));
19+
20+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to schema", "/icons/graphqlFile.svg");
21+
}
22+
}

0 commit comments

Comments
 (0)