drupalmoduleupgrader-8.x-1.5/tests/src/Unit/Plugin/DMU/Indexer/FunctionsTest.php

tests/src/Unit/Plugin/DMU/Indexer/FunctionsTest.php
<?php

namespace Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\Indexer;

use Drupal\drupalmoduleupgrader\Plugin\DMU\Indexer\Functions;

/**
 * @group DMU.Indexer
 * @covers \Drupal\drupalmoduleupgrader\Plugin\DMU\Indexer\Functions
 *
 * @expectID foo_blarg
 * @expectType \Pharborist\Functions\FunctionDeclarationNode
 */
class FunctionsTest extends IndexerTestBase {

  public function setUp(): void {
    parent::setUp();

    $code = <<<'END'
<?php

function foo_blarg() {}
END;
    $this->dir->getChild('foo.module')->setContent($code);

    $this->indexer = new Functions([], 'function', [], $this->db, $this->target);
    $this->indexer->build();
  }

  public function testQuery() {
    $this->assertInstanceOf('\Drupal\Core\Database\Query\Select', $this->indexer->getQuery());
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc