Exemplo n.º 1
0
    });
    describe('->setScope()', function () {
        it('should set the scope of the test', function () {
            $scope = new Scope();
            $test = new Test("spec", function () {
            });
            $test->setScope($scope);
            assert($scope === $test->getScope(), "setScope should have set scope");
        });
    });
    describe('->setParent()', function () {
        it('should bind the parent scope to the child', function () {
            $scope = new Scope();
            $parent = new Suite("parent", function () {
            });
            $parent->setScope($scope);
            $test = new Test("child", function () {
            });
            $test->setParent($parent);
            assert($scope === $test->getScope(), "scope should be parent scope");
        });
    });
    describe('file accessors', function () {
        it('should allow access to the file property', function () {
            $test = new Test('test');
            $test->setFile(__FILE__);
            $file = $test->getFile();
            assert($file === __FILE__);
        });
    });
});