You are here

public function CompositeFactoryTest::testHooks in AmazonS3 7.2

@covers Drupal\amazons3\CompositeFactory::factory

File

tests/CompositeFactoryTest.php, line 18

Class

CompositeFactoryTest
Test CompositeFactory.

Namespace

Drupal\amazons3Test

Code

public function testHooks() {
  $c = new CompositeFactory();
  $c
    ->factory('null-command');
  $this
    ->assertEquals($c
    ->getCallCount('module_invoke_all:amazons3_command_prepare'), 1);
  $this
    ->assertEquals($c
    ->getCallCount('drupal_alter:amazons3_command_prepare'), 1);
  $this
    ->assertEquals($c
    ->getCallCount('drupal_alter:amazons3_command'), 1);
}