new example

if ($permissions) {
      foreach ($permissions as $permission) {
        $this->role->grantPermission($permission);
      }
      $this->role->save();
    }
    $user->addRole($this->role->id());
    $user->save();

    if ($parent_access !== NULL) {
      $parent_entity = $this->prophesize(AccessibleInterface::class);
      $expected_parent_result = new ($parent_access)();
      $parent_entity->access($operation$user, TRUE)
        ->willReturn($expected_parent_result)
        ->shouldBeCalled();

      $this->blockEntity->setAccessDependency($parent_entity->reveal());

    }
    $this->blockEntity->save();

    // Reload a previous revision.     if ($loadRevisionId !== NULL) {
      
if (!filter_var(\ini_get('ffi.enable'), \FILTER_VALIDATE_BOOL)) {
            $this->markTestSkipped('FFI not enabled for CLI SAPI');
        }
    }

    public function testCastAnonymousStruct()
    {
        $this->assertDumpEquals(<<<'PHP' FFI\CData<struct <anonymous>> size 4 align 4 { uint32_t x: 0 } PHP, \FFI::cdef()->new('struct { uint32_t x; }'));
    }

    public function testCastNamedStruct()
    {
        $this->assertDumpEquals(<<<'PHP' FFI\CData<struct Example> size 4 align 4 { uint32_t x: 0 } PHP, \FFI::cdef()->new('struct Example { uint32_t x; }'));
    }

    
Home | Imprint | This part of the site doesn't use cookies.