<commit_before><?php
/**
 * This file is part of phpDocumentor.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright 2010-2015 <NAME><<EMAIL>>
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
 * @link      http://phpdoc.org
 */

namespace Flyfinder\Specification;

use Mockery as m;
use Flyfinder\Path;

/**
 * Test case for InPath
 * @coversDefaultClass Flyfinder\Specification\InPath
 */
class InPathTest extends \PHPUnit_Framework_TestCase
{
    /** @var InPath */
    private $fixture;

    public function testExactMatch()
    {
        $absolutePath = 'absolute/path/to/file.txt';
        $spec = new InPath(new Path($absolutePath));
        $this->assertTrue($spec->isSatisfiedBy(['dirname' => $absolutePath]));
    }
<commit_msg>fix location spec of exact file path<commit_after><?php
/**
 * This file is part of phpDocumentor.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright 2010-2015 <NAME><<EMAIL>>
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
 * @link      http://phpdoc.org
 */

namespace Flyfinder\Specification;

use Mockery as m;
use Flyfinder\Path;

/**
 * Test case for InPath
 * @coversDefaultClass Flyfinder\Specification\InPath
 */
class InPathTest extends \PHPUnit_Framework_TestCase
{
    /** @var InPath */
    private $fixture;

    public function testExactMatch()
    {
        $absolutePath = 'absolute/path/to/file.txt';
        $spec = new InPath(new Path($absolutePath));
        $this->assertTrue($spec->isSatisfiedBy([
            'type' => 'file',
            'path' => $absolutePath,
            'dirname' => $absolutePath,
            'filename' => 'file',
            'extension' => 'txt',
            'basename' => 'file.txt'
        ]));
    }

{'fraction_non_alphanumeric': 0.13072916666666667, 'fraction_numerical': 0.008333333333333333, 'mean_word_length': 3.010438413361169, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4878446', 'n_tokens_mistral': 583, 'n_tokens_neox': 566, 'n_words': 151}