Skip to content

Commit

Permalink
Fix issue with ResourceLocator
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 13, 2019
1 parent 80dba3e commit 4e0d947
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.2.1] - 2019-01-13
- Fix issue with ResourceLocator

## [4.2.0] - 2019-01-13
- Updated Dependencies for 4.2

Expand Down Expand Up @@ -31,6 +34,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- Implement equals, not_equals, telephone, uri, and username rules


[4.2.1]: https://github.com/userfrosting/fortress/compare/4.2.0...4.2.1
[4.2.0]: https://github.com/userfrosting/fortress/compare/4.1.2...4.2.0
[4.1.3]: https://github.com/userfrosting/fortress/compare/4.1.2...4.1.3
[4.1.2]: https://github.com/userfrosting/fortress/compare/v4.1.1...4.1.2
Expand Down
18 changes: 10 additions & 8 deletions tests/ExtendSchemaTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use PHPUnit\Framework\TestCase;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
use UserFrosting\UniformResourceLocator\ResourceLocator;
use UserFrosting\Fortress\RequestSchema\RequestSchemaRepository;
use UserFrosting\Support\Repository\Loader\YamlFileLoader;
use UserFrosting\Support\Repository\PathBuilder\StreamPathBuilder;
Expand All @@ -11,18 +11,20 @@ class ExtendSchemaTest extends TestCase
protected $basePath;

protected $locator;

public function setUp()
{
$this->basePath = __DIR__ . '/data';

// Arrange
$this->locator = new UniformResourceLocator($this->basePath);
$this->locator = new ResourceLocator($this->basePath);

$this->locator->registerStream('schema');

// Add paths one at a time to simulate how they are added in SprinkleManager
$this->locator->addPath('schema', '', 'core/schema');
$this->locator->addPath('schema', '', 'account/schema');
$this->locator->addPath('schema', '', 'admin/schema');
// Add them one at a time to simulate how they are added in SprinkleManager
$this->locator->registerLocation('core');
$this->locator->registerLocation('account');
$this->locator->registerLocation('admin');
}

public function testExtendYamlSchema()
Expand All @@ -49,7 +51,7 @@ public function testExtendYamlSchema()
]
]
],
"email" => [
"email" => [
"validators" => [
"length" => [
"min" => 1,
Expand Down

0 comments on commit 4e0d947

Please sign in to comment.