Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Aug 30, 2014
1 parent 85785c3 commit 2aab7d2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions spec/report/parser/ResultSpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* This file is part of CoverallsKit.
*
* (c) Noritaka Horio <holy.shared.design@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace coverallskit\spec\report\parser;

use coverallskit\report\parser\Result;
use coverallskit\entity\SourceFile;
use coverallskit\entity\collection\SourceFileCollection;

describe('Result', function() {
describe('getSources', function() {
before(function() {
$this->path = realpath(__DIR__ . '/../../fixtures/foo.php');

$source = new SourceFile($this->path);
$sources = new SourceFileCollection();
$sources->add($source);

$this->originalSources = $sources;

$this->result = new Result($sources, []);
$this->sources = $this->result->getSources();
});
it('return coverallskit\entity\collection\SourceFileCollection', function() {
expect($this->sources)->toEqual($this->originalSources);
});
});
});

0 comments on commit 2aab7d2

Please sign in to comment.