Go\Core\GoAspectContainerTest::testAspectCanBeRegisteredAndReceived PHP Method

testAspectCanBeRegisteredAndReceived() public method

Tests that aspect can be registered and accessed
    public function testAspectCanBeRegisteredAndReceived()
    {
        $aspect = $this->getMock(Aspect::class);
        $aspectClass = get_class($aspect);
        $this->container->registerAspect($aspect);
        $this->assertSame($aspect, $this->container->getAspect($aspectClass));
        // Verify that tag is working
        $aspects = $this->container->getByTag('aspect');
        $this->assertSame(array("aspect.{$aspectClass}" => $aspect), $aspects);
    }