Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting directory cascade paths requires a trailing slash #76

Closed
sdunham opened this issue Nov 11, 2018 · 2 comments
Closed

Setting directory cascade paths requires a trailing slash #76

sdunham opened this issue Nov 11, 2018 · 2 comments

Comments

@sdunham
Copy link
Contributor

sdunham commented Nov 11, 2018

Expected behavior

Setting custom directory cascade paths should either not require a trailing slash, or an exception should be thrown if an invalid path is submitted. In either case, the documentation should match the required format

Actual behavior

When setting custom directory cascade paths for views/js/css, the provided paths need to include a trailing slash, which doesn't match what's included in the documentation.

Steps to reproduce behavior

// Set a custom js directory path without the trailing slash
$this->set_script_directory_cascade([
	get_template_directory() . '/js',
]);

// Try the get a script URI for a file that exists in /js and throw an exception when it fails
if ($site->get_script_uri('file_that_exists.js') === '') {
	throw new Exception('FOILED AGAIN');
}

What version of WordPress/PHP/Timber/Conifer are you using?

Conifer 0.4

How did you install Conifer? (for example, via git clone, GitHub zip download, Composer/Packagist?)

GitHub zip download

acobster pushed a commit that referenced this issue Dec 7, 2018
acobster pushed a commit that referenced this issue Dec 7, 2018
@acobster
Copy link
Contributor

acobster commented Dec 7, 2018

@sdunham I believe this is fixed. Can you confirm?

@acobster
Copy link
Contributor

@sdunham saw your comment about trailingslashit, but I don't really care to add more mocks to the tests just to shave off a few lines of code. Going ahead and closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants