2015-10-01 23:48:33 +00:00
|
|
|
package engine_test
|
2015-09-17 21:22:07 +00:00
|
|
|
|
|
|
|
import (
|
2015-09-22 20:55:36 +00:00
|
|
|
"os"
|
2015-09-17 21:22:07 +00:00
|
|
|
"testing"
|
2015-10-01 23:48:33 +00:00
|
|
|
|
|
|
|
php "github.com/deuill/go-php"
|
2015-09-17 21:22:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewEngineContext(t *testing.T) {
|
2015-10-01 23:48:33 +00:00
|
|
|
e, err := php.New()
|
2015-09-17 21:22:07 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("New(): %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
defer e.Destroy()
|
|
|
|
|
2015-10-01 23:48:33 +00:00
|
|
|
ctx, err := php.NewContext(os.Stdout)
|
2015-09-17 21:22:07 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("NewContext(): %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
defer ctx.Destroy()
|
|
|
|
}
|