CakeDC\Users\Auth\Rules\OwnerTest::testNotAllowedBelongsToMany PHP Method

testNotAllowedBelongsToMany() public method

Test using the Owner rule in a belongsToMany association Posts belongsToMany Users
public testNotAllowedBelongsToMany ( ) : void
return void
    public function testNotAllowedBelongsToMany()
    {
        $this->Owner = new Owner(['table' => 'PostsUsers', 'id' => 'post_id']);
        $this->request->params = ['plugin' => 'CakeDC/Users', 'controller' => 'IsNotUsed', 'pass' => ['00000000-0000-0000-0000-000000000002']];
        $user = ['id' => '00000000-0000-0000-0000-000000000001'];
        $this->assertFalse($this->Owner->allowed($user, 'user', $this->request));
    }