SoftDelete\Test\TestCase\Model\Table\SoftDeleteBehaviorTest::testFindBelongsToMany PHP Method

testFindBelongsToMany() public method

Tests that soft deleted records in join table are taken into account when retrieving an entity with a belongsToManyAssociation.
    public function testFindBelongsToMany()
    {
        $post = $this->postsTable->findById(1)->contain('Tags')->first();
        $this->assertEquals(1, count($post->tags));
    }