Skip to content

Commit e69a4b5

Browse files
committed
Add integration test crate.
1 parent 2e5a6f1 commit e69a4b5

File tree

7 files changed

+49
-0
lines changed

7 files changed

+49
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ members = [
1111
"examples/hello",
1212
"examples/log",
1313
"examples/http-client",
14+
"tests/integration",
1415
]

tests/integration/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "values"
3+
version = "0.1.0"
4+
authors = ["jmjoy <[email protected]>"]
5+
edition = "2018"
6+
publish = false
7+
license = "Unlicense"
8+
9+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10+
11+
[lib]
12+
crate-type = ["cdylib"]
13+
14+
[dependencies]
15+
phper = { version = "0.2.0-alpha.2", path = "../../phper" }
16+
17+
[dev-dependencies]
18+
phper-test = { version = "0.2.0-alpha.2", path = "../../phper-test" }

tests/integration/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE

tests/integration/src/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![warn(rust_2018_idioms, clippy::dbg_macro, clippy::print_stdout)]
2+
3+
mod values;
4+
5+
use phper::{modules::Module, php_get_module};
6+
7+
#[php_get_module]
8+
pub fn get_module() -> Module {
9+
let mut module = Module::new(
10+
env!("CARGO_PKG_NAME"),
11+
env!("CARGO_PKG_VERSION"),
12+
env!("CARGO_PKG_AUTHORS"),
13+
);
14+
15+
// ...
16+
17+
module
18+
}

tests/integration/src/values.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use phper_test::test_php_scripts;
2+
use std::{env, path::Path};
3+
4+
#[test]
5+
fn test_php() {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
ini_set("display_errors", "On");
4+
ini_set("display_startup_errors", "On");
5+
error_reporting(E_ALL);

0 commit comments

Comments
 (0)